//
//  IVWEngine.h
//  AIKITDemo
//
//  Created by xyzhang on 2023/3/16.
//

#import "IFlyBaseEngine.h"
#import "IFlyIVWConfig.h"

NS_ASSUME_NONNULL_BEGIN

@protocol IFlyWakeupEngineDelegate <NSObject>

@optional

- (void)onWakeupEngineRunEndDelegate:(int)errorCode;

- (BOOL)onWakeupEngineStopAndWaitResultDelegate;

- (void)onWakeupEngineGetResultDelegate:(NSString *)result;

- (void)onWakeupEngineOnEvent:(int)eventType isLast:(BOOL)isLast arg1:(int)arg1 data:(NSString *)eventData;

@end

@interface IVWEngine : IFlyBaseEngine

@property (nonatomic, weak) id<IFlyWakeupEngineDelegate> delegate;

@property (nonatomic, strong) IFlyIVWConfig *ivwConfig;

/*
 启动唤醒
 */
- (int)startEngine;

/*
 设置参数
 */
- (void)setConfig:(IFlyIVWConfig *)config;

/*
 结束唤醒
 */
- (void)stopEngine;

/**
 写入录音数据
 */
- (int)writeAudio:(const void*)buffer length:(unsigned int)length audioStatus:(int)audioStatus;

@end

NS_ASSUME_NONNULL_END
